import { request } from '@gui-pkg/request';

enum Api {
  RRSingleStData = "/api/rsvr/st/findSingleStData",  // 水库水位信息
  PPSingleStData = '/api/pptn/st/findSingleStData', // 时段内雨量数据
  HdZQWInfo = '/yndsj/yndp/ssxx/getHdZQWInfo', // 水文站数据
  getStbprpbInfo = '/ynzt/cockpit/getStStbprpB', // 站点基本信息
}

const requestOptions = {
  joinParamsToUrl: true, // post请求的时候添加参数到url
};

//获取时段内水库水位信息
export const getRsvrData = (params) => {
  return request.post({ url: Api.RRSingleStData, params });
};

//获取水文站数据
export const getHdZQWInfo = (params) => {
  return request.post({ url: Api.HdZQWInfo, params }, requestOptions);
};

//获取时段内雨量数据
export const getRainData = (params) => {
  return request.post({ url: Api.PPSingleStData, params });
};


// 站点基本信息
export const getStbprpbInfo = (params) => {
  return request.get({ url: Api.getStbprpbInfo, params });
}

